package org.anq.ddm.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.anq.ddm.mapper.InstanceMapper;
import org.anq.ddm.pojo.Instance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InstanceService extends ServiceImpl<InstanceMapper, Instance> {

    @Autowired
    InstanceMapper instanceMapper;

    public Instance getApplyByInstanceId(String instanceId){
            QueryWrapper<Instance> qw = new QueryWrapper();
            if (instanceId != null)
                qw.eq("instanceid", instanceId);
            Instance d = this.instanceMapper.selectOne(qw);
            return d;
        }
}
